<div class="col-lg-12">
    <h1>RMS Cloud</h1>
    <br/>
    <div class="btn-group">
        <a href="/rmscloud/add" class="btn btn-success">+ Upload a new file</a></div>
    <hr/>
    <table class="table table-striped table-hover" style="width: 100%;">
        <thead>
            <tr>
                <th><div align="center">Photo</div></th>
            	<th><div align="center">Company</div></th>
                <th>Description</th>
                <th></th>
            </tr>
        </thead>
        <tbody>
        <?php if ($rmscloud){?>
            <?php foreach ($rmscloud as $p){?>
                <tr>
                    <td><div align="center"><img width="32px" height="32px" src="/public/rmscloud/<?php echo $p->photo?>"/></div></td>
                	<td><div align="center"><?php echo $companies[$p->company_id]->title;?></div></td>
                    <td><div align="center"><?php echo $p->file_description; ?></div></td>
                    <td style="text-align: right;">
                        <div class="btn-group">
                            <a class="btn btn-default dropdown-toggle" data-toggle="dropdown" href="#">
                                Actions
                                <span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu" style="text-align: left;">
                                <li><a href="/rmscloud/view/<?php echo $p->id?>" id="view"><i class="icon-edit"></i> View File</a></li>
                                <li><a href="/public/rmscloud/<?php echo $p->photo; ?>" download="<?php echo $p->photo ?>" id="download"><i class="icon-edit"></i> Download File</a></li>
                                <li><a href="/rmscloud/edit/<?php echo $p->id?>" id="edit"><i class="icon-edit"></i> Edit</a></li>
                                <li><a href="/rmscloud/delete/<?php echo $p->id?>" id="delete"><i class="icon-trash"></i> Delete</a></li>
                            </ul>
                        </div>
                    </td>
                </tr>
            <?php }?>
        <?php }?>
        </tbody>
    </table>
</div>